﻿<UserControl x:Class="TfsBugger.Controls.BuggerStackItemControl"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    Height="53" MinWidth="250" Width="Auto" 
    Loaded="OnControlLoaded" 
    BorderThickness="0 1 0 1">
	<UserControl.Resources>
		<Storyboard x:Key="DotTransformStoryboard">
			<MatrixAnimationUsingPath 
				Storyboard.TargetName="DotTransform" 
				Storyboard.TargetProperty="Matrix" 
				Duration="0:0:1" 
				RepeatBehavior="Forever">
				<MatrixAnimationUsingPath.PathGeometry>
					<PathGeometry Figures="m 1,0 h 50,0" />
				</MatrixAnimationUsingPath.PathGeometry>
			</MatrixAnimationUsingPath>
		</Storyboard>
	</UserControl.Resources>
	<Border BorderBrush="Gray" BorderThickness="1">
		<Border.Background>
			<LinearGradientBrush StartPoint="0,1" EndPoint="0,0">
				<GradientStop Color="WhiteSmoke" Offset="0" />
				<GradientStop Color="White" Offset=".5" />
				<GradientStop Color="WhiteSmoke" Offset="1" />
			</LinearGradientBrush>
		</Border.Background>
		<Grid Width="Auto" Height="Auto">
			<Grid.ColumnDefinitions>
				<ColumnDefinition />
			</Grid.ColumnDefinitions>
			<Grid.RowDefinitions>
				<RowDefinition />
				<RowDefinition />
				<RowDefinition />
			</Grid.RowDefinitions>

			<TextBlock 
				Grid.Row="0" 
				Name="lblName" 
				FontWeight="Bold" 
				VerticalAlignment="Center" 
				HorizontalAlignment="Left" 
				Margin="5 0 0 0" 
				Text="Bugger Name" />
				
			<TextBlock 
				Grid.Row="0" 
				Name="lblRunningStatus"
				HorizontalAlignment="Right" 
				VerticalAlignment="Center" 
				Margin="0 0 5 0" 
				Text="Running" />
				
			<TextBlock 
				Grid.Row="1" 
				Name="lblServerName" 
				HorizontalAlignment="Left" 
				VerticalAlignment="Center" 
				Margin="5 0 0 0" 
				Foreground="Blue" 
				Text="(Server Unassigned)" />
				
			<TextBlock 
				Grid.Row="2" 
				Name="lblCurStatus"
				HorizontalAlignment="left" 
				VerticalAlignment="Center" 
				Margin="5 0 0 0" 
				Foreground="Gray" 
				FontStyle="Italic" 
				Text="Bugging server for check-ins..." />
				
			<Border 
				Name="AnimCanvasContainer"
				Grid.Row="2" 
				HorizontalAlignment="Right" 
				Height="Auto" 
				Width="50" 
				BorderBrush="Gray"
				BorderThickness=".5" 
				Visibility="Hidden">
				<!--<Viewport3D>
					<Viewport3D.Camera>
						<PerspectiveCamera Position="-2,2,2" LookDirection="2,-2,-2" UpDirection="0,1,0" />
					</Viewport3D.Camera>
					<ModelVisual3D>
						<ModelVisual3D.Content>
							<DirectionalLight Color="White" Direction="-1,-1,-1" />
						</ModelVisual3D.Content>
					</ModelVisual3D>
					<ModelVisual3D>
						<ModelVisual3D.Content>
							<GeometryModel3D>
								<GeometryModel3D.Geometry>
									<MeshGeometry3D Positions="-1,0,0 0,1,0 1,0,0" TriangleIndices="0,2,1" />
								</GeometryModel3D.Geometry>
								<GeometryModel3D.Material>
									<DiffuseMaterial Brush="Red" />
								</GeometryModel3D.Material>
							</GeometryModel3D>
						</ModelVisual3D.Content>
					</ModelVisual3D>
				</Viewport3D>-->
				<Canvas Name="AnimCanvas" VerticalAlignment="Stretch" Background="#373839" Width="50" Grid.Row="1">
					<Ellipse 
						Fill="White" 
						Height="8" 
						Width="8"
						Canvas.Top="6" 
						ClipToBounds="True">
						<Ellipse.BitmapEffect>
							<OuterGlowBitmapEffect GlowColor="WhiteSmoke" Opacity=".7" GlowSize="10" />
						</Ellipse.BitmapEffect>
						<Ellipse.RenderTransform>						
							<MatrixTransform x:Name="DotTransform">
								<MatrixTransform.Matrix>
									<Matrix />
								</MatrixTransform.Matrix>
							</MatrixTransform>
						</Ellipse.RenderTransform>
					</Ellipse>
					
				</Canvas>
			</Border>
		</Grid>
	</Border>	
	
</UserControl>
